<template>
	<ResourcePage ref="refPageController" page-name="系统故障日志" scene="fail" @get:list="getTableData">
		<template #columns>
			<el-table-column prop="faultType" label="故障类型" align="center" />
			<el-table-column prop="faultReason" label="故障描述" align="center" />
			<el-table-column prop="deviceName" label="设备名称" align="center" />
			<el-table-column prop="system" label="系统ID" align="center" />
			<el-table-column prop="faultTime" label="故障时间" align="center" />
		</template>
	</ResourcePage>
</template>

<script setup>
import { ref } from 'vue'
import ResourcePage from '../components/ResourcePage.vue'
import { fetchLogsFault } from '@/api/logs.services'
const refPageController = ref(null)

const getTableData = async (postData, { resolve }) => {
	const result = await fetchLogsFault(postData)
	if (result.code == 1) {
		resolve({
			list: result.data.data,
			total: result.data.total
		})
	}
}
</script>
